<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <span v-if="isUser">
        <label for="username">用户名：</label>
        <input type="text" id="username" placeholder="在此输入用户名">
    </span>
    <span v-else>
        <label for="email">邮&nbsp;&nbsp;&nbsp;箱：</label>
        <input type="text" id="email" placeholder="在此输入邮箱">
    </span>
    <button @click="isUser = !isUser">切换</button>
</div>
<script src="../js/vue.js"></script>
<script>
    const aaa = new Vue({
        el: "#app",
        data: {
            message: "hello,guys",
            isUser: true
        }
    })
</script>
</body>
</html>